package com.magenta.maxoptra.gis;

/**
 * Represent postal code for various countries
 * <p/>
 * <a href="http://en.wikipedia.org/wiki/Postal_code">See more...<a/>
 *
 * @author Sergey Grachev
 */
public interface PostalCode {

    /**
     * Country of postal code
     *
     * @return as is
     */
    GeoCountry getCountry();

    /**
     * Represents a postal code as value of distance matrix
     *
     * @return postal code as key
     */
    DistanceMatrixKey getDistanceMatrixKey();

    /**
     * Indicates that this is a non-standard postal code. Like<br>
     * <ul>
     * <li>GIR 0AA for National Girobank (UK)</li>
     * <li>SANTA CLAUS for mail to Santa Claus (Canada)</li>
     * </ul>
     *
     * @return as is
     */
    boolean isSpecial();

    /**
     * Represents a postal code string. Use {@link com.magenta.maxoptra.gis.format.PostalCodeFormatter#format PostalCodeFormatter}
     *
     * @return formatted postal code
     */
    String toString();
}